<?php

namespace Gds\ArticleBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class DepartementType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('nom')
            ->add('adresse','textarea')
            ->add('tel','text',array('label'=>'Téléphone','required'=>false))
            ->add('fax')
            ->add('type')
            ->add('ville')
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Gds\ArticleBundle\Entity\Departement'
        ));
    }

    public function getName()
    {
        return 'gds_articlebundle_departementtype';
    }
}
